package net.lanelife.casino.caipiao.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import net.lanelife.casino.common.entity.annotation.Checked;
import net.lanelife.casino.common.entity.support.CheckableEntity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "TB_BALANCE_CHANGE_REASON")
public class BalanceChangeReason extends CheckableEntity<Integer> {

	private static final long serialVersionUID = -7956305215078035636L;

	@Checked
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "DIRECTION", nullable = false)
	private BalanceChangeRecord.Direction direction;
	
	@Checked
	@Column(name = "CODE", length = 10, nullable = false, unique = true)
	private String code;
	
	@Checked
	@Column(name = "NAME", length = 10, nullable = false)
	private String name;

	public BalanceChangeRecord.Direction getDirection() {
		return direction;
	}

	public void setDirection(BalanceChangeRecord.Direction direction) {
		this.direction = direction;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
